public class bankAccount
{
    double _balance;
    String _account;

    bankAccount(double balance, String account)
    {
        _balance = balance;
        _account = account;
    }

    // 存款
    void deposit(double money)
    {
        _balance += money;
        System.out.printf("存款%f成功!\n", money);
    }

    // 取款
    void withdraw(double money)
    {
        if(money > _balance)
        {
            System.out.println("你的余额不足!");
            return;
        }

        _balance -= money;
        System.out.printf("取款%f成功!\n", money);
    }

    // 显示账号
    void showAccount()
    {
        System.out.printf("账号:%s\n", _account);
    }

    // 显示余额
    void showBalance()
    {
        System.out.printf("账号余额:%f\n", _balance);
    }

    public static void main(String[] args)
    {
        bankAccount myAccount = new bankAccount(0, "张三");
        myAccount.deposit(2000);
        myAccount.withdraw(5000);
        myAccount.withdraw(1888);
        myAccount.showAccount();
        myAccount.showBalance();
    }
}
